/**
 * Copyright (c) 2016 Lenovo Group
 * All Rights Reserved.
 * 
 * Project Name:lmrp-api
 * Create Time: 2016年1月29日 下午10:32:45
 */
package com.lenovo.lmrp.api.model.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 
 * @author wujin
 * @version v1.0
 */
@Entity
@Table(name = "itsm_ticket_sla")
public class TicketSLAPO {
    
    public static enum TicketSLAStep {
        RESPONSE("预约超时时间"),VISIT("上门超时时间"),RESOLVE("完成超时时间");
        
        private String descr;
        /**
         * 
         */
        private TicketSLAStep(String descr) {
            this.descr = descr;
        }
        
        public String getDescr(){
            return this.descr;
        }
    }
    
    
    @Id
    @Column
    private String id;
    
    @Column
    private String ticketId;
    
    @Column
    @Enumerated(EnumType.ORDINAL)
    private TicketSLAStep step;
    
    @Column
    private Date preWarning;
    
    @Column
    private Date overtime;
    
    @Column
    private boolean finished;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTicketId() {
        return ticketId;
    }

    public void setTicketId(String ticketId) {
        this.ticketId = ticketId;
    }

    public TicketSLAStep getStep() {
        return step;
    }

    public void setStep(TicketSLAStep step) {
        this.step = step;
    }

    public Date getPreWarning() {
        return preWarning;
    }

    public void setPreWarning(Date preWarning) {
        this.preWarning = preWarning;
    }

    public Date getOvertime() {
        return overtime;
    }

    public void setOvertime(Date overtime) {
        this.overtime = overtime;
    }

    public boolean isFinished() {
        return finished;
    }

    public void setFinished(boolean finished) {
        this.finished = finished;
    }
}
